JBoss Community Archive (Read Only)

Teiid 8.8

Choice Functions

Choice functions provide a way to select from two values based on some characteristic of one of the values.

Function

Definition

Datatype Constraint

COALESCE(x,y+)

Returns the first non-null parameter

x and all y's can be any compatible types

IFNULL(x,y)

If x is null, return y; else return x

x, y, and the return type must be the same type but can be any type

NVL(x,y)

If x is null, return y; else return x

x, y, and the return type must be the same type but can be any type

NULLIF(param1, param2)

Equivalent to case when (param1 = param2) then null else param1

param1 and param2 must be compatable comparable types

IFNULL and NVL are aliases of each other. They are the same function.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 13:01:53 UTC, last content change 2014-07-17 12:35:04 UTC.